<% if can? :write, :locks, resource %>
  <% prefix ||= "" %>
  <% warning = {resource: resource, warning: true, icon: warning_icon, text: "Add #{prefix}Warning", disabled: false} %>
  <% locking = {resource: resource, warning: false, icon: lock_icon, text: "Add #{prefix}Lock", disabled: false} %>

  <%= render '/locks/lock_button', warning %>
  <%= render '/locks/lock_button', locking %>
<% end %>
